sum = 0; while (n != 0) { sum += n % 10; n /= 10; }
int result = 17463.ToString().Sum(c => Convert.ToInt32(c));